﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="BackgrandManage_index" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >


<head>
<title>欢迎登录</title>
<style type="text/css">
body {
  background-color:#119fcd;
  font-size: 12px;
  font-family: Verdana, Arial, Helvetica, SunSans-Regular, Sans-Serif;
  color:#000000;  
  padding:0px;
  margin:0px;
}
#content { 	
  position:absolute;
  height:550px; 
  width:900px;
  margin:-280px 0px 0px -430px;
  top: 50%; 
  left: 50%;
 
  padding: 0px;
  background-color:#119fcd;
  border: 0px dotted #000000;
  overflow: auto;
}
td {
	font-family: "宋体";
	font-size: 12px;
	text-decoration: none;
	line-height: 20px;
}
input {
	border: none;
	background-color: #FFFFFF;
	color: #003399;
}
</style>
<script type="text/javascript" src="Scripts/jquery.min.js"></script>
</head>

<body>
<form id="form1" runat="server" defaultfocus="UserName">
<div id="content">


  <!------------------------------------------------------------------------------------------------>
                                                <table height="156" style="margin:200px 0px 0px 40px " cellspacing="0" cellpadding="0"
                                                    width="424" border="0">
                                                    <tbody>
                                                        <tr>
                                                           <%-- <td align="center">
                                                                </td>--%>
                                                        </tr>
                                                        <tr><!--<img height="26" src="../images/BackgrandManage/body_yw.gif" width="216" />-->
                                                            <td background="images/index_dl.jpg" style="width: 425px; height: 156px">
                                                                <table cellspacing="0" cellpadding="0" width="424" border="0">
                                                                    <tbody>
                                                                        <tr>
                                                                            <td width="143" style="height: 158px">
                                                                            </td>
                                                                            <td width="281" style="height: 158px">
                                                                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                                                                    <tbody>
                                                                                        <tr>
                                                                                        <td align="right" width="14%">
                                                                                            </td>
                                                                                            <td colspan="4" style="height: 32px">
                                                                                                <asp:Label ID="Label1" ClientIDMode="Static" runat="server" Text="" Visible="true" style="color:white;font-weight:bold;"></asp:Label>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="right" width="14%">
                                                                                            </td>
                                                                                            <td width="61%">
                                                                                                <table cellspacing="0" cellpadding="0" width="169" border="0">
                                                                                                    <tbody>
                                                                                                        <tr>
                                                                                                            <td align="right" width="173" background="images/xtb3.gif" height="26">
                                                                                                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                                                                                                    <tbody>
                                                                                                                        <tr>
                                                                                                                            <td style="height: 20px; width: 42%;">
                                                                                                                            </td>
                                                                                                                            <td style="height: 20px" width="58%">
                                                                                                                                <asp:TextBox ID="UserName" ClientIDMode="Static" TabIndex="1" runat="server" Width="101px"></asp:TextBox></td>
                                                                                                                        </tr>
                                                                                                                    </tbody>
                                                                                                                </table>
                                                                                                            </td>
                                                                                                        </tr>
                                                                                                    </tbody>
                                                                                                </table>
                                                                                            </td>
                                                                                            <td align="center" width="2%" rowspan="2">
                                                                                            </td>
                                                                                            <td rowspan="2" style="width: 23%">
                                                                                                <asp:ImageButton ID="ImageButton1" TabIndex="4"  runat="server"
                                                                                                    ImageUrl="images/denglu.jpg" OnClick="ImageButton1_Click" OnClientClick="return validate()"></asp:ImageButton></td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td align="right" height="45">
                                                                                            </td>
                                                                                            <td>
                                                                                                <table cellspacing="0" cellpadding="0" width="169" border="0">
                                                                                                    <tbody>
                                                                                                        <tr>
                                                                                                            <td align="right" width="173" background="images/xtb4.gif" height="26">
                                                                                                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                                                                                                    <tbody>
                                                                                                                        <tr>
                                                                                                                            <td style="height: 22px" width="42%">
                                                                                                                            </td>
                                                                                                                            <td style="height: 22px" width="58%">
                                                                                                                                <asp:TextBox ID="Password" ClientIDMode="Static" TabIndex="2" runat="server" Width="101px" TextMode="Password"></asp:TextBox></td>
                                                                                                                        </tr>
                                                                                                                    </tbody>
                                                                                                                </table>
                                                                                                            </td>
                                                                                                        </tr>
                                                                                                    </tbody>
                                                                                                </table>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr valign="top">
                                                                                            <td style="height: 45px" colspan="4">
                                                                                                <table cellspacing="0" cellpadding="2" width="74%" align="center" border="0">
                                                                                                    <tbody>
                                                                                                        <tr>
                                                                                                            <td width="73%" style="height: 24px">
                                                                                                                <span class="style2">验证码：</span>
                                                                                                                <asp:TextBox ID="tbx_Code" ClientIDMode="Static" TabIndex="3" runat="server" Width="76px" MaxLength="5"
                                                                                                                    CssClass="input2"></asp:TextBox></td>
                                                                                                            <td align="center" width="27%" style="height: 24px">
                                                                                                                <span class="style2">
                                                                                                                    <img height="20" src="Validate.aspx" width="50" /></span></td>
                                                                                                        </tr>
                                                                                                    </tbody>
                                                                                                </table>
                                                                                            </td>
                                                                                        </tr>
                                                                                    </tbody>
                                                                                </table>
                                                                            </td>
                                                                        </tr>
                                                                    </tbody>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                                
                                                


</div>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="UserName"
            Display="None" ErrorMessage="用户名不能为空！" SetFocusOnError="True"></asp:RequiredFieldValidator>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="Password"
            Display="None" ErrorMessage="密码不能为空！" SetFocusOnError="True"></asp:RequiredFieldValidator>
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
            ShowSummary="False" />
</form>
</body>
</html>
<script type="text/javascript">
function validate()
{
    var username = document.getElementById("UserName").value;
    var pass = document.getElementById("Password").value;
    var code = document.getElementById("tbx_Code").value;
    if (username.length == 0) {
        $("#Label1").text("请输入用户名!");
        $("#UserName").focus();
        return false;
    }
    if(pass.length==0) {
        $("#Label1").text("请输入密码!");
        $("#Password").focus();
        return false;
    }
    if(code.length==0) {
        $("#Label1").text("请输入验证码!");
         $("#tbx_Code").focus(); 
        return false;
    }
}
$(function () {
    $("#Password").keydown(function (event) {
        if (event.keyCode == 13) {
            $("#tbx_Code").focus(); return false;
        }
    });
});
</script>